package com.hdl.design.pattern.facade;

/**
 * 类名 Facade
 * 描述 外观类
 *
 * @author hedonglin
 * @version 1.0
 * @date 2019/10/6 21:43
 */
public class Facade {
    private SubSysOne subSysOne;
    private SubSysTwo subSysTwo;
    private SubSysThree subSysThree;
    private SubSysFour subSysFour;

    public Facade() {
        this.subSysOne = new SubSysOne();
        this.subSysTwo = new SubSysTwo();
        this.subSysThree = new SubSysThree();
        this.subSysFour = new SubSysFour();
    }

    /**
     * 方法描述: 方法A，调用子系统一，二
     * @author hedonglin
     * @date 2019/10/6 21:53
    */
    public void methodA(){
        subSysOne.methodOne();
        subSysTwo.methodTwo();
    }

    /**
     * 方法描述: 方法B，调用子系统三，四
     * @author hedonglin
     * @date 2019/10/6 21:53
     */
    public void methodB(){
        subSysThree.methodThree();
        subSysFour.methodFour();
    }
}
